package com.groupbuying.customer.dao;

import com.groupbuying.customer.domain.CustomerInStorkDO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;

/**
 * 奖品库存表
 * @author gaoruijun
 * @email 18511893135@163.com
 * @date 2019-08-01 09:13:14
 * @des
 */

@Mapper
@Repository
public interface CustomerInStorkDao {

	CustomerInStorkDO get(BigInteger uuid);
	
	List<CustomerInStorkDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(CustomerInStorkDO customerInStork);
	
	int update(CustomerInStorkDO customerInStork);
	
	int remove(BigInteger uuid);
	
	int batchRemove(BigInteger[] uuids);

	/**
	 * 根据中奖来源以及奖品减库存
	 * @param map
	 * @return
	 */
	CustomerInStorkDO getNumberByName(Map<String,String> map);

	List<CustomerInStorkDO> getAll();
}
